% Test script

close all
clear all

% List of the channels to be read
chan_name_list = {'MOT_BEAMS_POWER', 'MOT_PD_FLUOR'};

% Data root repertory
root_path = '/home/vanderbruggen/Dropbox/post_doc_icfo/data_mining/data_sample';

% Start date
date_start.year = 2014;
date_start.month = 2;
date_start.day = 13;

% End date
date_end.year = 2014;
date_end.month = 2;
date_end.day = 14;

[date, monitor_data] = LoadMonitorData(root_path, date_start, date_end, chan_name_list);

% Plot time evolution
subplot(2,1,1)
plot(date,monitor_data(:,1),'.')
subplot(2,1,2)
plot(date,monitor_data(:,2),'.')

% Plot correlation
figure
plot(monitor_data(:,1),monitor_data(:,2),'.')
